//
//  HCNavTableViewCell.m
//  HappyChildren
//
//  Created by WillyZhao on 2017/5/24.
//  Copyright © 2017年 WillyZhao. All rights reserved.
//

#import "HCNavTableViewCell.h"

#import "HCFindNavModel.h"

#import "UILabel+ChangeLineSpaceing.h"

@implementation HCNavTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
//    NSParagraphStyle *ss = [[NSParagraphStyle alloc] init];
    
//    [self.descLabel setParagraphStyle:ss];
    
    self.lineView.backgroundColor = YBKRGBCOLOR(241, 241, 241, 1);
    
    

    
}

-(void)setModel:(id)model {
    HCFindNavData *data = model;
    
    [self.imageView_ sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",data.logo]]];
    self.name.text = [NSString stringWithFormat:@"%@",data.name];
    self.descLabel.text = [NSString stringWithFormat:@"        %@",data.about];
    
    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:self.descLabel.text];
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    [paragraphStyle setLineSpacing:4];//设置行间距
    [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, self.descLabel.text.length)];
    self.descLabel.attributedText = attributedString;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
